package com.lxw.station.controller;

import com.lxw.station.core.R;
import com.lxw.station.core.Result;
import com.lxw.station.entity.CsdnUser;
import com.lxw.station.api.CSDNApi;
import com.lxw.station.service.RankService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@Slf4j
public class RankController {

    @Resource
    RankService rankService;


    @GetMapping("/rank")
    public Result<String> rank() throws InterruptedException {
        // 热榜
        List<CsdnUser> csdnUsers = CSDNApi.hotRank();
        // 内容榜

//
        return R.ok("ok");
    }

}
